﻿package MemoryDB;

import java.io.Serializable;

public class YuanColumn implements Serializable
{
	public YuanColumn()
	{
		this.yuanColumnState = YuanRowState.Noting;
		this.yuanColumnText = "";

	}

	public YuanColumn(String mText)
	{
		this.yuanColumnState = YuanRowState.Noting;
		this.yuanColumnText = mText;
	}

	private YuanRow myRow;
	/** 
	 自身所在Row
	 
	*/
	public final YuanRow getMyRow()
	{
		return myRow;
	}
	public final void setMyRow(YuanRow value)
	{
		myRow = value;
	}


	private YuanRowState yuanColumnState = YuanRowState.forValue(0);
	/** 
	 行的修改状态
	 
	*/
	public final YuanRowState getYuanColumnState()
	{
		return yuanColumnState;
	}
	public final void setYuanColumnState(YuanRowState value)
	{
		yuanColumnState = value;
	}



	private String outValue;
	private String yuanColumnText;
	/** 
	 行的内容
	 
	*/
	public final String getYuanColumnText()
	{
		return yuanColumnText;
	}
	public final void setYuanColumnText(String value)
	{

		if (!value.trim().equals(outValue))
		{
			outValue = value.trim();
			yuanColumnText = value.trim();
			this.yuanColumnState = YuanRowState.Update;
		}
	}

	@Override
	public String toString()
	{
		return this.getYuanColumnText();
	}

}